package jigou

import (
	"fmt"
	"github.com/zegoim/zego_server_assistant/token/go/src/token04"
)

func CreateToken(appId uint32, serverSecret string, userId string) string {
	var effectiveTimeInSeconds int64 = 3600 // token 的有效时长，单位：秒
	var payload string = ""                 // token业务认证扩展，基础鉴权token此处填空

	//生成token
	token, err := token04.GenerateToken04(appId, userId, serverSecret, effectiveTimeInSeconds, payload)
	if err != nil {
		fmt.Println(err)
		return ""
	}
	return token
}
